<template>
	<view class="recruit">
		<view style="height: 10px; background-color: #f4f8f9;">
		</view>
		
		<view class="box">
			<view class="content">
				<view v-for="item in work">
					<view class="partOne" @click="getMoreDetail(item.id)">
						<view class="container">
							<text class="work">{{item.workname}}</text>
							<text class="money">{{item.payment}}</text>
						</view>
						<view class="body">
							<view class="body1">以前干过</view>
							<view class="body2">有些经验</view>
							<view class="body3">很熟练</view>
							<view class="body4">随叫随到</view>
						</view>
						
						<view class="partOne_middle">
							<view class="image">
								<image class="borderImage"  :src="'http://192.168.0.112:8080'+item.userimage"></image>
								<image v-if="item.status != 0" class="borderImage2"  src="/static/tongguo.png"></image>
							</view>
							<view class="description">联系人·{{item.username}}</view>
							<view class="description2">{{item.location}}</view>
						</view>
						
						
					</view>
		
					<view style="height: 10px; background-color: #f4f8f9;">
					</view>
					
				</view>
		
					
			</view>
		</view>
		
		
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				work:'',
			}
		},
		onShow() {
		   const id = getApp().globalData.globeUser.userid
           this.GetWorkList(id);
		},
		methods: {
			
			GetWorkList(id){
				uni.request({
					url:getApp().globalData.baseUrl+'/MyWorkList/'+id,
					method:'GET',
					success: (res) => {
						this.work = res.data.success
						console.log(this.work)
					}
				})
			},
			
			getMoreDetail(id){
				uni.navigateTo({
					url:'/pages/page/workDescription/workDescription?id=' + id
				})
			}

		}
	}
</script>

<style>
	.recruit {
		background-color: #fbfbfd;
		display: block;
	}

	.search {
		top: 20px;
		align-items: center;
		justify-content: center;
		height: 100px;
		width: 100%;
		position: relative;
	}
	.searchInput {
		left: 10px;
		width: 80%;
		display: block;
		position: absolute;
	}
	.searchImage {
		width: 10%;
		display: block;
		position: absolute;
		right: 10px;
		top: 12px;
	}

	.searchImage image {
		height: 30px;
		width: 30px;
	}
	
	.box{
		background-color: #f4f8f9;
		width: 100%;
	}
	
	.content{
		background-color: #ffffff;
		margin-left: 10px;
		margin-right: 10px;
		border-radius: 8px;
		box-shadow: 0px 0px 5px #ccc; 
	}
	
	.content .partOne{
		height: 200px;
	}
	
	.middle{
		height: 40px;
		width: 100%;
		position: relative;
		margin-bottom: 10px;
		background-color: #fbfbfd;
	}
	.middle .recommend{
		position: absolute;
		left: 20px;
		font-weight: 300;
		top: 10px;
	}
	
	.middle .play{
		position: absolute;
		left: 100px;
		font-weight: 300;
		top: 10px;
	}
	
	.middle .click{
		top: 8px;
		position: absolute;
		left: 100px;
		font-weight: 800;
		font-size: 20px;
		border-bottom: 2px solid #008c8c;
	}
	
	.content .partOne{
		height: 200px;
		position: relative;
		width: 100%;
		margin-bottom: 10px;
	}
	
	.content .partOne .container{
		position: absolute;
		height: 20px;
		left: 10px;
		top: 10px;
		width: 100%;
	}
	
	.content .partOne .work{
		position: absolute;
		font-weight: bold;
		left: 0px;
		color: #212121;
	}
	.content .partOne .money{
		position: absolute;
		font-weight: bold;
		right: 20px;
		color: #839cef;
	}
	
	.content .partOne .body{
		position: absolute;
		height: 20px;
		width: 80%;
		top: 40px;
	}
	
	.content .partOne .body .body1{
		position: absolute;
		left: 10px;
		background-color: #f4f6f8;
		font-size: 15px;
		font-weight: 330;
	}
	.content .partOne .body .body2{
		position: absolute;
		left: 80px;
		background-color: #f4f6f8;
		font-size: 15px;
		font-weight: 330;
	}
	.content .partOne .body .body3{
		position: absolute;
		left: 150px;
		background-color: #f4f6f8;
		font-size: 15px;
		font-weight: 330;
	}
	.content .partOne .body .body4{
		position: absolute;
		left: 220px;
		background-color: #f4f6f8;
		font-size: 15px;
		font-weight: 330;
	}
	
	.partOne_middle{
		height: 80px;
	}
	.partOne_middle .image{
		position: absolute;
		top: 70px;
		left: 10px;
	}
	
	.partOne_middle .description {
		position: absolute;
		top: 150px;
		left: 50px;
	}
	
	.partOne_middle .description2{
		position: absolute;
		top: 150px;
		right: 20px;
	}
	
	.partOne .footer .end{
		position: absolute;
		top: 180px;
		left: 10px;
		bottom: 3px;
	}
	.borderImage{
		border-radius: 50%; 
		height: 45px; 
		width: 45px;
		position: absolute;
		left: -6px;
		top: 68px;
	}
	
	.image .borderImage2{
		position: absolute;
		width: 80px;
		height: 80px;
		left: 200px;
	}
	
</style>
